cc = sw5cc  -host 
cc_slave = sw5cc -slave 
cc =swgcc -mhost 
cc_slave=swgcc -mslave -msimd
cc_hybrid=swgcc -mhybrid -msimd
#DAG_HOME=/home/export/base/nsccwuxi_ict/chenl/online3/

DAG_HOME=/home/export/base/shisuan/swyjs/online/jsh/DAG_HOME
SCHEDULER_INSTALL_PATH=${DAG_HOME}/dag_task_scheduler

DEBUG = -DCHECK #-g
OPT = -O3  #-std=gnu99

#test0#EXTRA_FLAGS= -DN=5122 -DBS=40 -DTASK_BSIZE_1=40 #-DMMEM
EXTRA_FLAGS= -DN=5122 -DBS=80 -DTASK_BSIZE_1=80 #-DMMEM
#test2#EXTRA_FLAGS= -DN=5122 -DBS=160 -DTASK_BSIZE_1=80 #-DMMEM
#test3#EXTRA_FLAGS= -DN=5122 -DBS=320 -DTASK_BSIZE_1=80 #-DMMEM
#test4#EXTRA_FLAGS= -DN=5122 -DBS=640 -DTASK_BSIZE_1=80 #-DMMEM
#EXTRA_FLAGS+=-DINST_PERF 
LIBFLAGS =  -L${SCHEDULER_INSTALL_PATH}/lib -ldag_task_scheduler -lstdc++ -lm #-lswperf

CFLAGS = $(DEBUG) $(OPT) $(EXTRA_FLAGS) -Wall -I${SCHEDULER_INSTALL_PATH}/include 
 
dag:gauss_dag_master.o gauss_dag_slave.o
	$(cc_hybrid)  $(CFLAGS)  -o gauss_dag gauss_dag_master.o gauss_dag_slave.o $(LIBFLAGS)
gauss_dag_master.o: gauss_dag_master.c	
	$(cc) $(CFLAGS) -c  gauss_dag_master.c  $(LIBFLAGS)
gauss_dag_slave.o: gauss_dag_slave.c
	$(cc_slave) $(CFLAGS)  -c gauss_dag_slave.c  $(LIBFLAGS)


clean:
	@rm -f *.o  gauss_dag
	@echo Cleaning current directory 
clean_all:
	@rm -f *.o *.txt *.log tmp gauss_dag
	@echo Cleaning current directory
